import request from "../request";
//商品列表数据
async function getGoodlist(props: any) {
  const data = await request({
    url: "goods",
    method: "get",
    params: props,
  });
  return data;
}
//商品分类数据
async function getClassifylist(props: any) {
  const data = await request({
    url: "categories",
    method: "get",
    params: props,
  });
  return data;
}

//参数列表
async function getParamslist(props: any) {
  const data = await request({
    url: `categories/${props.id}/attributes`,
    method: "get",
    params: props,
  });
  return data;
}

export default { getGoodlist, getClassifylist, getParamslist };
